<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="UTF-8">
		<title>window对象操作窗口</title>
	</head>
	<body onload="open_adv();">
		<button onclick="close_plan();">关闭</button>
		<script type="text/javascript">
			/*弹出窗口*/
			function open_adv() {
				window.open("http://www.baidu.com");
			}
			/*关闭窗口*/
			function close_plan() {
				window.close();
			}
		</script>
	</body>
</html>